home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / engrave / engrave_macros.h < prev    next >
C/C++ Source or Header  |  2006-01-09  |  270b  |  22 lines

  1. #ifndef ENGRAVE_MACROS_H
  2. #define ENGRAVE_MACROS_H
  3.  
  4. #undef NEW
  5. #define NEW(type, num) calloc(num, sizeof(type))
  6.  
  7. #undef FREE
  8. #define FREE(val) \
  9. { \
  10.   free(val); val = NULL; \
  11. }
  12.  
  13. #undef IF_FREE
  14. #define IF_FREE(val) \
  15. { \
  16.   if (val) FREE(val) \
  17.   val = NULL; \
  18. }
  19.  
  20. #endif
  21.  
  22.